import 'package:flutter/material.dart';

class MainScreen extends StatefulWidget {
  const MainScreen({super.key});

  @override
  State<MainScreen> createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PlatformMenuBar(menus: [
        PlatformMenu(label: '菜单1', menus: [
          PlatformMenuItemGroup(members: [
            PlatformMenuItem(
                label: "测试1",
                onSelected: () {
                  print("测试1");
                }),
            PlatformMenuItem(label: "测试2")
          ])
        ]),
        PlatformMenu(label: '课程', menus: [
          PlatformMenuItemGroup(members: [
            PlatformMenuItem(label: "Unit1"),
            PlatformMenuItem(label: "Unit2")
          ])
        ]),
      ], child: Placeholder()),
    );
  }
}
